1. Field of the Invention
The present invention relates to video signal processing, and more particularly to a method of enhancing the picture detail of dim portions of a video while at the same time decreasing the amount of computation required for video signal processing, thereby reducing the manufacturing cost of the signal encoding chip.
2. Description of the Prior Art
To be viewed in an analog video display device, such as a TV set, a digital video signal needs to be converted by a TV encoder into an analog TV signal. Because the content of a video frame is too dark, or the light in an environment of watching TV is too bright, portions of the image often appear dim and the detail is not easily discerned. Such dim portions may be caused by unsatisfactory brightness contrast of the display device.
For display devices, including CRTs, it is known that the intensity of light does not have a linear relationship with the applied input voltage. The non-linearity is referred to as the gamma value, which when expressed as the power of a normalized voltage equals the normalized intensity. Gamma values vary for CRTs; however, it is usually close to 2.5 because the non-linear increment of an output voltage is caused by electrostatic effects in the electronic gun. Refer to FIG. 1, which is a diagram of the relationship between the normalized intensity and the input voltage. As shown in the figure, the gamma effect generated by a CRT may reduce the brightness of an image in both dark areas and bright areas. For example, it can be observed in the diagram that, due to the exponential relationship with the input voltage, a brightness of only 18% will be displayed when the input voltage is 50%. This causes a reduction of the brightness in the dark areas of the image, thereby reducing the quality of the viewed image in this region.
Gamma correction is the nonlinear expansion and compression of video signals used to compensate for the nonlinearities in display devices (please see as xe2x80x9cVideo Demystified by Keith Jack - High Text Publications 1995xe2x80x9d) Gamma correction can also be used to enhance the picture detail of dim portion. Gamma correction can be accomplished by various means; for example, built-in analog devices are often used in a TV set, while computer systems can use application software to correct the digital signal before its convertion to analog signal for display on the screen.
FIG. 2 is a flowchart illustrating a digital video signal that is converted by a TV encoder into an analog signal for display on the TV screen. As shown in diagram, a digital video source 5, such as in a PC, reads the image data from a CD_ROM, comprising the original digital signal SIG5, and outputs the signal which is decompressed by a video signal processing circuit 10, such as MPEG. Generally, such output signals include a processed digital luminance signal SIG10 and other processed digital chrominance signals SIG20. Some devices, such as a digital camera, combine the digital video source 5 and the video signal processing circuit 10, thereby outputting the digital luminance signal SIG10 and the digital chrominance signals SIG20. The luminance signal SIG10 and the chrominance signals SIG20 in turn are input into TV encoder 20 for conversion into an analog signal SIG30.
Due to the quality of the video itself (contrast is especially a problem when the signal has been converted from film to video), or the exceeding brightness of the surround during viewing, picture detail of the dim areas is reduced. In systems using the RGB color model (wherein discrete voltages are applied to red, green, and blue electron gun control circuitry of a display device), a method called RGB gamma correction is used to solve this problem before conversion by the TV encoder.
FIG. 3 is a flowchart illustrating RGB Gamma Correction. First, as shown in FIG. 2, the digital video signals are output through the digital video source 5 and the video signal processing circuit 10. In this case, the digital video signals comprise the digital luminance signal SIG10 and the digital chrominance signals SIG20, wherein the signal SIG20 includes two color difference signals (S30). The luminance signal SIG10 and the chrominance signals SIG20, are then converted by a matrix operation into three RGB signal components (S32). Next, a gamma correction processing is performed (S34). The operation of gamma correction with an exponential value is then applied to the each of the three RGB signal components. For example, if the inputs of the three components are expressed by Rin, Gin, and Bin, and the three signal after gamma correction are expressed by Rout, Gout, and Bout, then the gamma correction relationship can be expressed by:
Rout=(Rin) 1/r;
Gout=(Gin) 1/r; and
Bout=(Bin) 1/r;
wherein, the value r is varied according to the desired amplitude of the correction, usually being greater than 1 to enlarge the contrast of a low intensity signal and to compress the variation of a high intensity signal against the saturation. Finally, the corrected RGB signals are converted by a matrix operation into a brightness/chrominance signal acceptable for a TV encoder (S36), which converts the signal into the analog TV signal for outputs by a display device, such as a TV set (S38).
Note that if the RGB gamma correction is conducted for each pixel of the three components of the three signal components by computation, the correction will consume a large amount of time and system resources. Therefore, the prior art normally accomplishes the exponential operation described above by the use of a lookup table. However, the prior art described above is still disadvantageous for the following reasons. First, because it is necessary to respectively process the gamma correction for each pixel of the three signal components, the needed computation is relatively large. Second, the video signal has to be converted twice, i.e., the conversion from luminance/chrominance to RGB before gamma correction as well as the conversion from RGB to luminance/chrominance after gamma correction. Hardware is needed to complete these conversions, which increases the manufacturing cost.
Therefore, it is an object of the present invention to provide a method of processing a video signal which can improve the picture detail of dim areas of an image without a large amount of computation so as to decrease video processing time and reduce the manufacturing cost of the video processing device.
The method of processing a video signal of the present invention comprises the following steps: First, receiving a video input signal including an input luminance signal and input chrominance signals from a signal source. Next, correcting the input luminance signal of the video input signal to generate a corrected luminance signal. And finally outputting the corrected luminance signal and the input chrominance signals as the processed video signal to a TV encoder, for converting the corrected signal from digital into an analog TV signal.
The correction of the luminance signal is accomplished by first normalizing the luminance signal by a predetermined value of a full-scale luminance. If the normalized luminance signal is greater than a first predetermined percentage, the corrected luminance signal is equal to the input luminance signal. If the normalized luminance signal is less than the first predetermined percentage and greater than a second predetermined percentage, the input luminance signal is corrected by non-linear correction to generate the corrected signal. If the normalized luminance signal is less than the second predetermined percentage, the input luminance signal is corrected by linear correction to generate the corrected luminance signal.
In the video processing method disclosed in accordance with this invention, because increasing luminance contrast often improve brightness contrast, the dark areas can be discerned more easily after this method applied. Besides, the portion of the luminance signal corrected by a non-linear relationship is shortened, decreasing the computational cost. Further, by dividing the luminance signal into three Ranges and applying appropriate correction to each Range, the wash-out effect is avoided without the need of RGB correction, which further saves computational cost and allows a simplified circuit design.